package com.tcd.permission.Util;


import java.util.List;

public class startpage {
    public static <T> List<T> startpage(List<T> list, int page, int pagesize) {
        if (list.size() == 0) {
            return null;
        }
        int size = list.size();
        int spage = (page - 1) * pagesize;
        int sum = page * pagesize;
        if (sum > size) {
            sum = size;
        }
        return list.subList(spage, sum);
    }
}
